﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html>




<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="width=device-width, initial-scale=1" name="viewport">
    <title>用户注册_我要滑雪网</title>
    <meta name="description" content="用户注册" />
    <meta name="keywords" content="用户注册" />
    <meta name="robots" content="all" />
    <link href="~/Css/ski.css" type="text/css" rel="stylesheet" />
    <link href="~/Css/style_zc.css" style="text/css" rel="stylesheet" />
    <link href="~/Css/public.css" style="text/css" rel="stylesheet" />
    <link href="~/Css/about.css" style="text/css" rel="stylesheet" />

    <script src="~/Js/Mobile device_style.js"></script>
    <script src="~/Js/jqueryhelp.js"></script>
    <script type="text/javascript" src="~/Js/tab.js"></script>
    <script src="~/Js/common.js" language="javascript"></script>


</head>
<base target="_self" />
<body>

    <div class="header">
        <div class="welcome">51SKI.COM 欢迎您</div>
    </div>
    <div class="wrap_zong">
        <div class="top">
            <div class="logo"><a href="/Home/Index" target="_self"><img src="http://img.51ski.com/images/logo-x.png" /></a></div>
            <div class="search">

                <form id="searchform" name="searchform" onsubmit="newsearch()">
                    <p class="p3">
                        <span class="jiaocheng_dj">雪场</span>
                        <input type="text" name="key" value="请输入雪场关键词" id="searchkey" />            <input type="submit" value="" class="submit" />
                    </p>
                    <div class="xiaxuan">
                        <span class="xuechang">雪场</span>
                        <span class="zixun">资讯</span>
                    </div>
                </form>


                <p class="p2"><span>|</span><a href="javascript:void(0)" class="shouji">手机版</a></p>

                <p class="p1"><span id="usernamespan" style="display:none"><a id="userName" href="/Home/Snow_Users"></a></span></p>


                <p class="p1"><a href="/Home/Snow_Users_Register">注册</a><span>|</span><a id="logoutspan" href="/Home/Snow_Users"><b class="color_red">登录</b></a></p>



                <p class="p4">
                    <a href="#">教学课程</a><a href="#">戏雪</a><a href="#">滑雪</a><a href="#">单板</a><a href="#">雪票预订</a>
                </p>

            </div>
            <ul class="nav">
                <li><a href="/Home/Snow_Map">雪场地图</a></li>
                <li><a href="/Home/News_Information">新闻资讯</a></li>
                <li><a href="/Home/Snow_Activity">雪场活动</a></li>
                <li><a href="/Home/Snow_Ticket">雪票预订</a></li>
                <li><a href="/Home/Snow_Course">滑雪教程</a></li>
                <li><a href="/Home/Snow_Video">酷炫视频</a></li>
                <li><a href="/Home/Snow_Users">用户中心</a></li>
            </ul>
        </div>
        <link rel="stylesheet" type="text/css" href="~/Css/jquery-ui.min.css">
        <script src="~/Js/jsondata.js"></script>
        <script src="~/Js/auth.js"></script>
        <script src="~/Js/newsearch.js">
        </script>
        <script src="~/Js/jquery-ui.min.js"></script>
        <script>
login();
var keyval = "雪场";
$(".xiaxuan").find("span").click(function(){
   keyval=$(this).html();
   if(keyval=="资讯"){
      $("#searchkey").val("请输入搜索内容");
   }else{
      $("#searchkey").val("请输入雪场关键词");
   }
});
    $("#searchkey").autocomplete({

	// 静态的数据源
    source: htmllist,
	select: function(event, ui){
		// event参数是事件对象
		$("#searchkey").val( ui.item.label);
		// 必须阻止默认行为，因为autocomplete默认会把ui.item.value设为输入框的value值
		event.preventDefault();
	}
	});
        </script>
        <div class="bannerBox">
            <div class="center zc_center">
                <p class="current_page"></p>
                <div class="zc_jd"></div>
                <div class="wrap">
                    <div class="txt_xinxi"><i>*</i>手机号码</div><div class="shuru_xinxi"><input type="text" id="username" /></div><div class="jingshi_xinxi" style="display:none">>请输入正确的手机号码</div>
                </div>
                <div class="yindao_xinxi">请输入正确的手机号码</div>


                <div class="wrap">
                    <div class="txt_xinxi"><i>*</i>登录密码</div><div class="shuru_xinxi"><input type="password" " id=" password" /></div><div class="jingshi_xinxi" style="display:none">密码过短，不能少于8位</div>
                </div>
                <div class="yindao_xinxi">密码必须由数字、字母、特殊字符三种中<br>的两种组成，密码长度6-20个字符</div>

                <div class="wrap">
                    <div class="txt_xinxi"><i>*</i>确认密码</div><div class="shuru_xinxi"><input type="password" id="repassword" /></div><div class="jingshi_xinxi" style="display:none">密码过短，不能少于8位</div>
                </div>
                <div class="yindao_xinxi">6~16位字符，支持英文、数字或符号</div>


                <div class="wrap">
                    <div class="txt_xinxi"><i>*</i>请输入验证码</div>
                    <div class="shuru_xinxi">
                        <img src="~/Js/getCodeImg.jsp" style="float:left;height:45px;" />
                        <input type="text" class="yzm" id="yzm" style="width: 148px;
margin-left: 10px;float:left;" />


                    </div>
                    <div class="jingshi_xinxi" style="display:none;">
                        验证码效验失败,请重新输入</divy>
                    </div>
                    <div class="yindao_xinxi">请正确输入验证码</div>


                    <div class="wrap">
                        <div class="txt_xinxi"><i>*</i>短信验证码</div><div class="shuru_xinxi duanxin"><input type="text" id="action_type" /><input type="button" class="btn" value="点击发送验证码" onclick="sendcode()" /><div class="jingshi_xinxi shuaxin"> </div></div>
                    </div>
                    <div class="yindao_xinxi">请输入验证码</div>


                    <div class="wrap">
                        <div class="shuru_xinxi"><input type="button" class="btn1" value="注册" onclick="show()" /></div>
                    </div>
                    <div class="yindao_xinxi bot_ydxx">没有帐号？ <a href="#"> 免费注册</a></div>

                    <script>

function show(){

//alert('test6');
if(!check()){
 return;
}

getData("http://admin.51ski.com/register/save.do", {
					"username": $('#username').val(),
					"action_type": $('#action_type').val(),
					"password": $('#password').val()
				}, function(result) {
				    if(!result.success){
					alert(result.failedReason);
					}else{
					 alert('注册成功！您可以登录');
					}

				});
}

function checksendcode(){
 var username=$.trim($('#username').val());
 if(username== '') {
    alert('请输入手机号码');
    return false;
  }
  if(!validatemobile(username)){
     alert('请输入正确的手机号码');
      return false;
   }

 return true;
}

function sendcode(){

//alert('test7');
if(!checksendcode()){
 return;
}

getData("http://admin.51ski.com/register/sendCode.do", {
				"username": $('#username').val(),
"yzm": $('#yzm').val(),
"action_type": $('#action_type').val()
				}, function(result) {
				    if(!result.success){
					alert(result.failedReason);
					}else{
					 //alert('已经发到用户手机,请输入验证码');
                                         messageBtnChange(".wrap .duanxin input.btn")
					}
				});
}

function check(){
 var username=$.trim($('#username').val());
 var password=$.trim($('#password').val());
 var repassword=$.trim($('#repassword').val());
var action_type=$.trim($('#action_type').val());
var yzm=$.trim($('#yzm').val());

  if(username== '') {
    alert('请输入手机号码');
    return false;
  }
   if(!validatemobile(username)){
     alert('请输入正确的手机号码');
      return false;
   }
  if(password== '') {
    alert('请输入密码');
    return false;
  }
   if (password.length < 6) {
            alert("密码不能小于6位！");
            return false;
        }
   if (password.length > 16) {
            alert("密码不能超过16位！");
            return false;
   }
    if(repassword== '') {
    alert('请输入确认密码');
    return false;
  }
      if(repassword !== password) {
    alert('密码和确认密码不相同');
    return false;
  }
if(yzm == '') {
    alert('请输入图文验证码');
    return false;
  }

   if(action_type == '') {
    alert('请输入手机验证码');
    return false;
  }






 return true;
}
function validatemobile(mobile)
   {

       if(mobile.length!=11)
       {
          // alert('请输入有效的手机号码！');

           return false;
       }

       var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
       if(!myreg.test(mobile))
       {
          // alert('请输入有效的手机号码！');

           return false;
       }
       return true;
   }
function messageBtnChange(obj){
    var sec=60;

    var messageBtn=$(obj);
    var yVal=messageBtn.val()
    var fontColor=$(obj).css("color");
    var bgColor=$(obj).css("background-color");
    var borderColor=$(obj).css("border");
    var jsTimes=setInterval(function(){
    messageBtn.attr('disabled',true)
        if(sec>0){
        messageBtn.val("已发送("+sec+")").css({
        cursor:'auto',
        color:'#666',
        background:'#f6f6f6',
        border:'1px solid #e3e4e4'
        });
        sec--;
        }else{
        messageBtn.attr('disabled',false).val(yVal).css({
        cursor:'pointer',
        color:fontColor,
        background:bgColor,
        border:borderColor
        });
        clearInterval(jsTimes)
        }
    },1000)
    }
                    </script>

                    <script type='text/javascript'>
(function(a,b,c,d){
a[c]=function(){a[c]['ar']=a[c]['ar']||[];a[c]['ar'].push(arguments);};
var s=b.createElement('script');s.async = 1;s.src='//t.agrantsem.com/js/agt.js';
var r=b.getElementsByTagName('script')[0];r.parentNode.insertBefore(s,r);
})(window,document,'_agtjs','script');
_agtjs('init','AG_368637_HKEQ','51ski.com');/*请将$网站主域$(包括“$”)替换为您嵌入代码的真实主域，例如：agrantsem.com*/
_agtjs('trackPv');
_agtjs('loadEvent',{atsev:101,'atsusr':'1'});
/* 请将$用户名$(包括“$”)替换为真实的用户名*/
/*需要绑定元素是指绑定页面元素的id或者class，分别用“#”和“.”选择，多个元素用“,”分割*/
/*关于参数，例如用户名，订单号等，需要填写注册的用户名或者订单号的参数，一般是您页面上取到的用户注册的用户名或生成的订单号*/
                    </script>






                </div>
            </div>
            <div class="zx_footer">

                <ul>
                    <li>
                        <img src="http://img.51ski.com/images/weibo_tuo1.png" />
                        <input type="button" value="进入官方微博" onclick="window.open('http://weibo.com/51ski/profile?s=6cm7D0')" />
                    </li>
                    <li>
                        <img src="http://img.51ski.com/images/weixin_tuo1.png" />
                        <input type="button" value="扫一扫立即注册" />
                    </li>
                </ul>
                <div class="erweima">
                    <img src="http://img.51ski.com/images/erweima.png" />
                </div>
                <div class="foot_con">
                    <p><a href="http://www.51ski.com/aboutus/">关于我们</a><span>|</span><a href="http://www.51ski.com/law/">法律声明</a><span>|</span><a href="http://www.51ski.com/joinus/">加入我们</a><span>|</span><a href="http://www.51ski.com/coop/">合作雪场</a><span>|</span><a href="http://www.51ski.com/connection/">联系我们</a></p>
                    <p>&copy;Copyright    1996-2014 51SKI  Corporation, All Rights Reserved</p>
                    <p><a href="http://www.miitbeian.gov.cn/publish/query/indexFirst.action">51SKI 京公网安备11010102001739号/京ICP备15016851号-4</a></p>
                    <p>我要滑雪网   版权所有 </p>
                </div>

            </div>
            <script type="text/javascript">
try{
var _ourplusPageurl = top.location.href;
}catch(e)
{
var _ourplusPageurl = location.href;
}
document.getElementById("logoutspan").href = "http://www.51ski.com/login/index.html?reurl=" + _ourplusPageurl;
            </script>
            <script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?3bbc0e16ff36039bc4d0e85091a39c71";
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(hm, s);
})();
            </script>

        </div>
</body>

</html>
